<template>
    <div class="Battery">
        <div class="one1">
            <div class="one1-lab">N</div>
            <div class="gren"
                :style="`background-color:${info.dlCount > 10 ? 'RGBA(49, 239, 129, 1)' : 'RGBA(255, 0, 0, 1)'};right:${100 - info.dlCount}%`">

            </div>
        </div>
        <div class="per" :style="`color:${info.dlCount > 10 ? 'RGBA(49, 239, 129, 1)' : 'RGBA(255, 0, 0, 1)'};`">
            {{ info.dlCount }}%
        </div>
    </div>
</template>
<script>
export default {
    props: {
        info: {
            default: () => {
                return {
                    dlCount: 0
                }
            },
        },
    },

    data() {
        return {};
    },
};
</script>
<style lang="scss" scoped>
.Battery {
    display: flex;
    align-items: center;
    font-size: 12px;

    .one1 {
        width: 25px;
        height: 10px;
        border: 1px solid #fff;
        position: relative;
        border-radius: 1px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 12px;

        &::after {
            width: 3px;
            height: 6px;
            content: " ";
            position: absolute;
            background-color: #fff;
            right: -3px;
            top: 2px;
            z-index: 10;
        }

        .gren {
            position: absolute;
            left: 0px;
            top: 0px;
            bottom: 0px;
            z-index: 5;
        }

        .one1-lab {
            position: absolute;
            left: 0px;
            right: 0px;
            top: 0px;
            bottom: 0px;
            z-index: 10;
            transform: scale(0.8);
        }
    }
    .per{
        margin-left: 6px;
    }
}</style>